unit dialog;

interface

uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
  Buttons, ExtCtrls,Messages;

type
  TDlg = class(TForm)
    OKBtn: TButton;
    Bevel1: TBevel;
    Label1: TLabel;
    dbtxt: TMemo;
    Button1: TButton;
    procedure ToClip(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Dlg: TDlg;

implementation
uses unit1;

{$R *.dfm}

procedure TDlg.ToClip(Sender: TObject);
begin
form1.Enabled:=true;

dlg.Hide;
end;

procedure TDlg.FormClose(Sender: TObject; var Action: TCloseAction);
begin
form1.Enabled:=true;

dlg.Hide;
end;

procedure TDlg.Button1Click(Sender: TObject);
begin

if(dlg.Visible) then FocusControl(dbtxt);
dbtxt.SelectAll;
 SendMessage(dbtxt.Handle, WM_COPY, 0, 0);

end;

end.
